home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…ch: Other People's Memory / ADC Developer CD (1993-03) (''Other People's Memory'')_iso / Dev.CD Mar 93.iso / Technical Documentation / Sample Code / DTS.Lib & Samples / DTS.Lib / TUndoObj.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-10-22  |  1.6 KB  |  83 lines  |  [TEXT/MPS ]

  1. /*
  2. ** Apple Macintosh Developer Technical Support
  3. **
  4. ** Program:     DTS.Lib
  5. ** File:        TUndoObj.c
  6. ** Written by:  Eric Soldan
  7. **
  8. ** Copyright © 1992 Apple Computer, Inc.
  9. ** All rights reserved.
  10. */
  11.  
  12.  
  13.  
  14. #ifndef __OSEVENTS__
  15. #include <OSEvents.h>
  16. #endif
  17.  
  18. #ifndef __OSUTILS__
  19. #include <OSUtils.h>
  20. #endif
  21.  
  22. #ifndef __QUICKDRAW__
  23. #include <Quickdraw.h>
  24. #endif
  25.  
  26. #ifndef __STRING__
  27. #include <String.h>
  28. #endif
  29.  
  30. #ifndef __TREEOBJ__
  31. #include "TreeObj.h"
  32. #endif
  33.  
  34. #ifndef __UTILITIES__
  35. #include "Utilities.h"
  36. #endif
  37.  
  38.  
  39.  
  40. #pragma segment File
  41. long    TUndoObj(TreeObjHndl hndl, short message, long data)
  42. {
  43.     char    *cptr;
  44.  
  45.     switch (message) {
  46.         case VHMESSAGE:
  47.             cptr = ((VHFormatDataPtr)data)->data;
  48.             ccatchr(cptr, 13, 2);
  49.             ccat   (cptr, "$10: TUndoObj:");
  50.             ccatchr(cptr, 13, 1);
  51.             ccat   (cptr, "  $00: root         = $");
  52.             ccathex(cptr, '0', 8, 8, (long)mDerefUndo(hndl)->root);
  53.             ccatchr(cptr, 13, 1);
  54.             ccat   (cptr, "  $04: frHndl       = $");
  55.             ccathex(cptr, '0', 8, 8, (long)mDerefUndo(hndl)->frHndl);
  56.             ccatchr(cptr, 13, 1);
  57.             ccat   (cptr, "  $08: disabled     = ");
  58.             ccatdec(cptr, mDerefUndo(hndl)->disabled);
  59.             ccatchr(cptr, 13, 1);
  60.             ccat   (cptr, "  $0A: lastEditType = ");
  61.             ccatdec(cptr, mDerefUndo(hndl)->lastEditType);
  62.             ccatchr(cptr, 13, 1);
  63.             ccat   (cptr, "  $0C: undoDepth    = ");
  64.             ccatdec(cptr, mDerefUndo(hndl)->undoDepth);
  65.             ccatchr(cptr, 13, 1);
  66.             ccat   (cptr, "  $0E: maxNumUndos  = ");
  67.             ccatdec(cptr, mDerefUndo(hndl)->maxNumUndos);
  68.             ccatchr(cptr, 13, 1);
  69.             ccat   (cptr, "  $10: numSaveUndos = ");
  70.             ccatdec(cptr, mDerefUndo(hndl)->numSaveUndos);
  71.             return(true);
  72.             break;
  73.  
  74.         default:
  75.             break;
  76.     }
  77.  
  78.     return(noErr);
  79. }
  80.  
  81.  
  82.  
  83.